package com.jsbj.user.entities;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 系统登录用户表
 * </p>
 *
 * @author jsbj
 * @since 2022-02-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysUser对象", description="系统登录用户表")
public class SysUser implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "用户ID")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "登录账号")
    private String loginId;

    @ApiModelProperty(value = "昵称")
    private String userName;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "密码加密算法归属的业务域编码")
    private String pwdDomainCode;

    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "移动设备类型")
    private String equipmentType;

    @ApiModelProperty(value = "移动设备码")
    private String equipmentId;

    @ApiModelProperty(value = "注册来源(1后台 2APP）")
    private Integer registerSource;

    @ApiModelProperty(value = "用户状态（1:未激活；2:正常；3:已注销；4:密码锁定）")
    private Integer userState;

    private Date lastLoginTime;

    @ApiModelProperty(value = "用户密码锁定截止时间")
    private Date userPwdLockTime;

    @ApiModelProperty(value = "是否租户账号")
    private String isTenant;

    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;

    @ApiModelProperty(value = "用户标识")
    private String isStatus;

    @ApiModelProperty(value = "盐值")
    private String salt;

    @ApiModelProperty(value = "身份证")
    private String idCard;

    @ApiModelProperty(value = "动态字段")
    private String dynamicFiled;

    @ApiModelProperty(value = "钉钉用户ID")
    private String ddUserId;

    @ApiModelProperty(value = "头像url")
    private String imageUrl;

    @ApiModelProperty(value = "微信授权openid")
    private String weixinOpenid;

    @ApiModelProperty(value = "0可用 1不可用")
    private Integer disabled;

    @ApiModelProperty(value = "创建人用户ID")
    private String createrId;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date createTime;

    @ApiModelProperty(value = "最后变更人用户ID")
    private String updateId;

    @ApiModelProperty(value = "最后变更时间")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date updateTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "验证码")
    private String message;

    @ApiModelProperty(value = "验证码接收时间")
    private String messageTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "组织id")
    private String orgId;

    @TableField(exist = false)
    @ApiModelProperty(value = "角色id")
    private String roleId;

    @TableField(exist = false)
    @ApiModelProperty(value = "编辑按钮")
    private boolean edit;

    @TableField(exist = false)
    @ApiModelProperty(value = "删除按钮")
    private boolean del;

    @TableField(exist = false)
    @ApiModelProperty(value = "重置按钮")
    private boolean reset;

    @TableField(exist = false)
    @ApiModelProperty(value = "群组id")
    private String groupId;

    @TableField(exist = false)
    @ApiModelProperty(value = "租户编码")
    private String tenantCode;

    @TableField(exist = false)
    @ApiModelProperty(value = "岗位id")
    private String postId;

}
